package com.forsythia.sns.dao;

import java.io.Serializable;
import java.util.List;

import com.forsythia.sns.to.BaseTO;

public interface BaseDAO {

    public <T extends BaseTO> List<T> findByExample(T instance);

    public <T extends BaseTO> T findById(Class<T> clazz, Serializable id);
    
    public <T extends BaseTO> List<T> findByProperty(Class<T> clazz, String propertyName, Object value);
    
    public <T extends BaseTO> T insert(T instance);
    
    public <T extends BaseTO> T update(T instance);

    public void delete(BaseTO instance);

}
